Ext.define('TS.view.base.ProductSimpleList' ,{
    extend: 'Ext.grid.Panel',
    alias : 'widget.productsimplelist',
    title : '商品资料',
    columnLines: true,
    bodyPadding:0,
    frame : true,//面板渲染
    closable: true,
    /* fields: ['productId', 'classifyId','repositoryId','productCode','productName',
    'packSpec', 'manufId','manuf','unit','innerPack',
    'boxPack', 'abc','qtyScale','priceScale',
    'deleted', 'virtual','licenseNo','batchMgr','barcode','remark'
    ]	*/
    columns:[
            {header: '商品编号', dataIndex: 'productCode',width:70},
            {header: '商品名称', dataIndex: 'productName',width:200},
            {header: '规格', dataIndex: 'packSpec', width:100},
            {header: '生产企业', dataIndex: 'manuf',width:150},
            {header: '单位', dataIndex: 'unit',width:40},
            {header: '中包装数量', dataIndex: 'innerPack', width:70,align:'right'},
            {header: '箱装数量', dataIndex: 'boxPack',width:70,align:'right'},
            {header: '批准文号', dataIndex: 'licenseNo',width:140}            
    ],
	selType:'checkboxmodel',//设定选择模式
	multiSelect:true,//运行多选
	initComponent:function(){
		var st=Ext.create('TS.store.base.ProductStore');
		
		Ext.apply(this, {
			dockedItems :[{
				xtype:'pagingtoolbar',
				store:st,
				dock:'bottom',
				displayInfo:true
			}],
			//verticalScrollerType: 'paginggridscroller',
		    // do not reset the scrollbar when the view refreshs
		    //invalidateScrollerOnRefresh: false,
		    // infinite scrolling does not support selection
		    //disableSelection: true,
			store:st
		});
		this.callParent(arguments);
	}
});
